home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / e / mailinglists / amigae.0793july.archive / 000028_crash!kirk.safb.af.mil!BWILLS_Tue, 13 Jul 93 05:41:36 PST.msg < prev    next >
Internet Message Format  |  1994-05-26  |  2KB

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Tue, 13 Jul 93 05:41:36 PST
  3. Received: from kirk.safb.af.mil by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #15) id m0oFjN3-0000zeC; Tue, 13 Jul 93 05:22 PDT
  5. Message-Id: <m0oFjN3-0000zeC@crash.cts.com>
  6. Date: 13 Jul 93 07:19:00 CST
  7. From: "Barry D. Wills" <BWILLS@kirk.safb.af.mil>
  8. To: "amigae" <amigae@bkhouse.cts.com>
  9. Subject: re:  Optimizing E, Assembly and E
  10.  
  11. > (; Working on anything lately, Barry?
  12.  
  13. Not really.  Just cleaning up my hard drive in prep for the arrival of OS2.1.
  14. See my IdentifyProcessors program?  I was especially interested in it because 
  15. I run 2 processors and it's nice to have a system that doesn't have to be told 
  16. how to startup. :)  But I was also thinking of the possibility that E  may be 
  17. producing processor specific code in the near future.  This info could be used 
  18. to make programs more optimal/robust.
  19.  
  20. >queried.. hmmm.. weird. In the second case.. the same. Did Wouter say that
  21. >the new version can output debug symbols?
  22.  
  23. I don't recall mention of it.  But now would be a good opportunity. :)
  24.  
  25. >> >One last suggestion.. how about making some E functions (such as WriteF)
  26. >> >more assembling friendly, so you can use certain E functions in the middle
  27. >> >of an assembly code? ie. it uses only the upper data/address registers
  28. (4-7)
  29. >> >and leaves the lower ones intact.
  30.  
  31. >> Wouter told me you can do this:
  32. >>     MOVEM D0-D7/A0-A3,(A7)+  ;/* Save multiple regs, post inc stack (SP). */
  33. >>     WriteF ('whatever')
  34. >>     MOVEM -(A7),D0-D7/A0-A3  ;/* Pre dec stack, restore multiple regs (SP). */
  35.  
  36. >Good idea, forgot about it. Still, a bit cumbersome, but it's do.
  37. >Btw: The syntax looks pretty much like the correct syntax. (;
  38.  
  39. Yeah.  If you're lazy, like me, you can make two subroutines at the end of your
  40. program:
  41.  
  42. savem: 
  43.         MOVEM D0-D7/A0-A3,(A7)+
  44.         RTS
  45.  
  46. restorem:
  47.         MOVEM -(A7),D0-D7/A0-A3 
  48.         RTS
  49.  
  50. Then you can use in your program:
  51.  
  52.         JSR   savem
  53.         WriteF ('E functions to your hearts content...')
  54.         JSR   restorem
  55.  
  56. I know you already know this.  I'm just posting it because *I* just learned it
  57. myself, and someone else may find this useful.  An excellent debugging tool for
  58. learning assembly.
  59.  
  60. BTW (Wouter), is A6 free for our use in E?  Should we be saving and restoring 
  61. A0-A3,A6 .vs. only A0-A3?
  62.  
  63. Later.  -- Barry
  64.